<!--
  - login.php
  - v0.01
  - 2/1/2011
  - 
  - This source code generates the user interface for logging in. 
  -->
<?php 
	if(isset($_SESSION["analyst"]) || isset($_SESSION["administrator"])){
		session_destroy();
	}
?>
<html>
	<head>
		<title>USER LOGIN</title>
		<link rel="stylesheet" type="text/css" href="scripts/login.css" />
		<script type="text/javascript" src="scripts/loginValidate.js"></script>
	</head>
	<body>
		<fieldset>
			<legend>LOG-IN</legend>
			<form name = "login" action="ProcessLogin.php" method = "post">
				<table>
					<tr>
						<td><p>USERNAME</p></td>
						<td><input type = "text" name = "username" id = "username" maxlength = "30" /></td>
						<td><div id = "user"><?php if(isset($_GET["error"]))echo "Wrong Username or Password ";?></div></td>
					</tr>
					<tr>
						<td><p>PASSWORD</p></td>
						<td><input type = "password" name = "password" id = "password" maxlength = "30" /></td>
						<td><div id = "pass"></div></td>
					</tr>
					<tr>
						<td><input type = "submit" value = "Log-In" onclick = "return validate()" /></td>
					</tr>
				</table>
			</form>
		</fieldset>
	</body>
</html>